#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main() {
    string s, t;
    while (getline(cin, s)) {
        getline(cin, t);
        vector<string> v;
        for (int i = 0; i < s.size(); ++i) {
            string tem;
            if (s[i] == '"') {
                i++;
                while (i < s.size() && s[i] != '"') {
                    tem += s[i];
                    i++;
                }
                i++;
            }
            else {
                while (i < s.size() && s[i] != ',') {
                    tem += s[i];
                    i++;
                }
            }
            v.push_back(tem);
            tem.clear();
        }
        auto it = find(v.begin(), v.end(), t);
        if (it == v.end()) cout << "Important!" << endl;
        else cout << "Ignore" << endl;
    }

    return 0;
}
